package com.rockcent.mall.lib.repository;

import com.rockcent.mall.lib.domain.OrderEvent;
import com.rockcent.mall.lib.domain.enumclass.OrderEventType;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by DK on 16/11/16.
 */
@Repository
public interface OrderEventRepository extends JpaRepository<OrderEvent, Long>, JpaSpecificationExecutor, OrderEventRepositoryCustom {
    List<OrderEvent> findByMerchantOrderNumAndMallOrderNum(String orderNum, String mallOrderNum);

    OrderEvent findByMerchantIdAndMerchantOrderNumAndEventType(Long id, String merchantOrderNum, OrderEventType payed);
}
